﻿namespace com.crownpack
{
    public class Layout
    {
        #region Fields

        public const string Address1 = "Address1";
        public const string Branch = "Branch"; //
        public const string BranchManager = "BranchManager"; //
        public const string BranchName = "BranchName"; //
        public const string City = "City"; //
        public const string DivisionCode = "DivisionCode"; //
        public const string GroupCode = "GroupCode"; //
        public const string LocationName = "LocationName"; //
        public const string LocationNo = "LocationNo"; //
        public const string ManagerEMail = "ManagerEMail";
        public const string NA_ManagerEmailAddress = "NA_ManagerEmailAddress";
        public const string NA_ManagerName = "NA_ManagerName"; //
        public const string NA_ManagerNo = "NA_ManagerNo"; //
        public const string NA_ManagerPhone = "NA_ManagerPhone";
        public const string ParentCustomerName = "ParentCustomerName"; //
        public const string ParentCustomerNo = "ParentCustomerNo"; //
        public const string Salesrep = "Salesrep"; //
        public const string SalesrepEmailAddress = "SalesrepEmailAddress"; //
        public const string SalesrepName = "SalesrepName";
        public const string SalesrepPhone = "SalesrepPhone"; //
        public const string SectorCode = "SectorCode"; //
        public const string St = "St"; //
        public const string Zip = "Zip"; //

        static string[] _Keys;

        #endregion Fields

        #region Properties

        public static string[] Keys
        {
            get
            {
                if ( _Keys == null )
                    _Keys = new string[ ] {
                        Address1,
                        Branch,
                        BranchManager,
                        BranchName,
                        City,
                        DivisionCode,
                        GroupCode,
                        LocationName,
                        LocationNo,
                        ManagerEMail,
                        NA_ManagerEmailAddress,
                        NA_ManagerName,
                        NA_ManagerNo,
                        NA_ManagerPhone,
                        ParentCustomerName,
                        ParentCustomerNo,
                        Salesrep,
                        SalesrepEmailAddress,
                        SalesrepName,
                        SalesrepPhone,
                        SectorCode,
                        St,
                        Zip
                    };
                return _Keys;
            }
        }

        #endregion Properties

        #region Methods

        public static string GetInternalName( string baseName )
        {
            return string.Format( "cp{0}", baseName );
        }

        #endregion Methods
    }

    public class Position
    {
        #region Fields

        public const int Address1 = 5;
        public const int Branch = 20;
        public const int BranchManager = 22;
        public const int BranchName = 21;
        public const int City = 6;
        public const int DivisionCode = 9;
        public const int GroupCode = 10;
        public const int LocationName = 1;
        public const int LocationNo = 2;
        public const int ManagerEMail = 23;
        public const int NA_ManagerEmailAddress = 14;
        public const int NA_ManagerName = 13;
        public const int NA_ManagerNo = 12;
        public const int NA_ManagerPhone = 15;
        public const int ParentCustomerName = 4;
        public const int ParentCustomerNo = 0;
        public const int Salesrep = 16;
        public const int SalesrepEmailAddress = 18;
        public const int SalesrepName = 17;
        public const int SalesrepPhone = 19;
        public const int SearchType = 3;
        public const int SectorCode = 11;
        public const int St = 7;
        public const int Zip = 8;

        #endregion Fields
    }
}